﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:Configuration="clr-namespace:SenenFernandez.Sensktop.Configuration"
    xmlns:Enum="clr-namespace:SenenFernandez.Sensktop.Enum"
    xmlns:Converter="clr-namespace:SenenFernandez.SmartExtensionMethods.Converter;assembly=SenenFernandez.SmartExtensionMethods"
>
    <Configuration:WorkingArea x:Key="WorkingArea" />
    <Converter:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />

    <Style x:Key="MainViewStyle" TargetType="Window">
        <Setter Property="Left" Value="{Binding Source={StaticResource WorkingArea}, Path=Instance.Left}" />
        <Setter Property="Top" Value="{Binding Source={StaticResource WorkingArea}, Path=Instance.DesktopTop}" />
        <Setter Property="Width" Value="{Binding Source={StaticResource WorkingArea}, Path=Instance.Width}" />
        <Setter Property="Height" Value="{Binding Source={StaticResource WorkingArea}, Path=Instance.DesktopHeight}" />
        <Setter Property="Topmost" Value="True" />
        <Setter Property="ShowInTaskbar" Value="False" />
        <Setter Property="ResizeMode" Value="NoResize" />
        <Setter Property="WindowStyle" Value="None" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="AllowsTransparency" Value="True" />
    </Style>

    <Style x:Key="PopupWindowStyle" TargetType="Window" BasedOn="{StaticResource MainViewStyle}">
        <Setter Property="Width" Value="Auto" />
        <Setter Property="Height" Value="Auto" />
        <Setter Property="SizeToContent" Value="WidthAndHeight" />
    </Style>

    <BitmapImage x:Key="CloseImage" UriSource="/Sensktop;component/Resources/Close.png"/>
    <BitmapImage x:Key="TaskManagerImage" UriSource="/Sensktop;component/Resources/TaskManager.png"/>

    <SolidColorBrush x:Key="WhiteColor" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="BlackColor" Color="#FF000000" />
    <SolidColorBrush x:Key="FontColor" Color="#FF003366" />
    <SolidColorBrush x:Key="MouseOverColor" Color="#3F0082CC" />
    <SolidColorBrush x:Key="SelectedColor" Color="#3F001766" />
    <SolidColorBrush x:Key="WindowColor" Color="#99004D99" />
    <SolidColorBrush x:Key="AlternationColor" Color="#CCBFBFBF" />

    <LinearGradientBrush x:Key="MouseOverBackground" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#3F3282FF" Offset="0"/>
        <GradientStop Color="#3F0082CC" Offset="0.325"/>
        <GradientStop Color="#3F0B82B1" Offset="0.5"/>
        <GradientStop Color="#3F0082CC" Offset="0.725"/>
        <GradientStop Color="#3F3282FF" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="SelectedBackground" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#3F1E1799" Offset="0" />
        <GradientStop Color="#3F001766" Offset="0.325"/>
        <GradientStop Color="#3F001759" Offset="0.5"/>
        <GradientStop Color="#3F001766" Offset="0.725"/>
        <GradientStop Color="#3F1E1799" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MenuItemSeparatorBackground" EndPoint="0.88,0.43" StartPoint="0.016,0.43">
        <GradientStop Color="#3FBBBBBB" Offset="0"/>
        <GradientStop Color="#3FECECEC" Offset="0.862"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RunningBackground" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#3F00F000" Offset="0" />
        <GradientStop Color="#3F009900" Offset="0.325"/>
        <GradientStop Color="#3F008C00" Offset="0.5"/>
        <GradientStop Color="#3F009900" Offset="0.725"/>
        <GradientStop Color="#3F00F000" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="NotRespondingBackground" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#3FF00000" Offset="0" />
        <GradientStop Color="#3F990000" Offset="0.315"/>
        <GradientStop Color="#3F8C0000" Offset="0.5"/>
        <GradientStop Color="#3F990000" Offset="0.725"/>
        <GradientStop Color="#3FF00000" Offset="1" />
    </LinearGradientBrush>

    <Style x:Key="DefaultListBoxItem" TargetType="ListBoxItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                      SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" 
                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Padding" Value="0" />
        <Setter Property="Margin" Value="1" />
    </Style>

    <Style TargetType="ListBoxItem" BasedOn="{StaticResource DefaultListBoxItem}" />

    <Style x:Key="RepeatButtonStyle" TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Padding" Value="0,0,0,0" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Foreground" Value="{StaticResource BlackColor}" />
        <Style.Triggers>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="Foreground" Value="{StaticResource SelectedBackground}" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{StaticResource MouseOverBackground}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="RenderTransform">
                    <Setter.Value>
                        <TranslateTransform X="1.0" Y="1.0" />
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="HorizontalScrollBarTemplate" TargetType="{x:Type ScrollBar}">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="18" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="18" />
            </Grid.ColumnDefinitions>
            <RepeatButton IsEnabled="{TemplateBinding IsMouseOver}" Command="ScrollBar.PageLeftCommand">
                <RepeatButton.Style>
                    <Style TargetType="{x:Type RepeatButton}" BasedOn="{StaticResource RepeatButtonStyle}">
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="{x:Type RepeatButton}">
                                    <Border Background="{x:Null}" Height="18" Width="18" >
                                        <Path Data=" M 8 15 L 8 3 L 2 9 Z" Fill="{TemplateBinding Foreground}" />
                                    </Border>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </RepeatButton.Style>
            </RepeatButton>
            <RepeatButton IsEnabled="{TemplateBinding IsMouseOver}" Command="ScrollBar.PageRightCommand" Grid.Column="2">
                <RepeatButton.Style>
                    <Style TargetType="{x:Type RepeatButton}" BasedOn="{StaticResource RepeatButtonStyle}">
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="{x:Type RepeatButton}">
                                    <Border Background="{x:Null}" Height="18" Width="18" >
                                        <Path Data=" M 9 15 L 9 3 L 15 9 Z" Fill="{TemplateBinding Foreground}" />
                                    </Border>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </RepeatButton.Style>
            </RepeatButton>
        </Grid>
    </ControlTemplate>

    <ControlTemplate x:Key="ScrollViewerTemplate" TargetType="{x:Type ScrollViewer}">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Column="0" Grid.Row="0" Orientation="Horizontal" Height="14"
                       Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                       ViewportSize="{TemplateBinding ViewportWidth}"
                       Minimum="0" Maximum="{TemplateBinding ScrollableWidth}"
                       Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                       AutomationProperties.AutomationId="HorizontalScrollBar"
                       Template="{StaticResource HorizontalScrollBarTemplate}"/>
            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Margin="15,2,15,0" Grid.Column="0" Grid.Row="0"
                                    Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" 
                                    CanContentScroll="True" CanHorizontallyScroll="True" CanVerticallyScroll="False" />
        </Grid>
    </ControlTemplate>

    <Style x:Key="ToolbarPanelListBox" TargetType="{x:Type ListBox}">
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Height" Value="{Binding Height, RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Grid}}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <ScrollViewer Focusable="False" CanContentScroll="True" Template="{StaticResource ScrollViewerTemplate}">
                        <ItemsPresenter />
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="MenuItemSeparator">
        <DockPanel Width="2" Background="{StaticResource MenuItemSeparatorBackground}" />
    </ControlTemplate>

    <Style x:Key="AplicationImage" TargetType="Image">
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="DockPanel.Dock" Value="Left" />
        <Setter Property="Width" Value="32" />
        <Setter Property="Height" Value="32" />
        <Setter Property="Margin" Value="4,0,0,0" />
        <Setter Property="Source" Value="{Binding IconSource}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IconSource}" Value="{x:Null}" >
                <Setter Property="Visibility" Value="Collapsed" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="DefaultStyle" TargetType="FrameworkElement">
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="ToolTipService.ShowDuration" Value="{x:Static System:Int32.MaxValue}" />
        <Setter Property="ToolTipService.InitialShowDelay" Value="0" />
        <Setter Property="ToolTipService.BetweenShowDelay" Value="0" />
    </Style>

    <Style x:Key="DefaultButton" TargetType="Button" BasedOn="{StaticResource DefaultStyle}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="FontSize" Value="13" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Foreground" Value="{StaticResource BlackColor}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border Name="Border" BorderThickness="0" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                        <Grid Name="Content">
                            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap">
                                <ContentPresenter />
                            </TextBlock>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter Property="Background" Value="{StaticResource SelectedColor}" />
                            <Setter Property="Foreground" Value="{StaticResource WhiteColor}" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{StaticResource MouseOverColor}" />
                            <Setter Property="Foreground" Value="{StaticResource WhiteColor}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="Content" Property="RenderTransform" >
                                <Setter.Value>
                                    <TranslateTransform X="1.0" Y="1.0" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="#FF888888" />
                            <Setter TargetName="Border" Property="Opacity" Value="0.6" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MenuItemButton" TargetType="Button" BasedOn="{StaticResource DefaultButton}">
        <Setter Property="FontSize" Value="10" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="ToolTip" Value="{Binding Description}" />
        <Setter Property="Command" Value="{Binding ClickCommand}" />
        <Setter Property="Background" Value="#3FFFFFFF" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border Name="Border" Background="{TemplateBinding Background}">
                        <DockPanel Name="Content">
                            <ContentControl Template="{StaticResource MenuItemSeparator}" DockPanel.Dock="Right" />
                            <Viewbox DockPanel.Dock="Top" Width="12" Height="12" HorizontalAlignment="Center" VerticalAlignment="Center"
                                     Visibility="{Binding HasChildApplications, Converter={StaticResource BoolToVisibilityConverter}}">
                                <Path x:Name="ExpandPath" Data="M 4 0 L 0 4 L 8 4 Z">
                                    <Path.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FF000000" Offset="1"/>
                                            <GradientStop Color="#FF394553"/>
                                        </LinearGradientBrush>
                                    </Path.Fill>
                                </Path>
                            </Viewbox>
                            <DockPanel>
                                <Image Style="{StaticResource AplicationImage}" />
                                <TextBlock Margin="0,0,4,0" Text="{Binding Name}" MaxWidth="100" VerticalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" />
                            </DockPanel>
                        </DockPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding ApplicationStatus}" Value="{x:Static Enum:ApplicationStatus.Running}">
                            <Setter Property="Background" Value="{StaticResource RunningBackground}" />
                            <Setter Property="Foreground" Value="{StaticResource WhiteColor}" />
                        </DataTrigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter Property="Background" Value="{StaticResource SelectedBackground}" />
                            <Setter Property="Foreground" Value="{StaticResource WhiteColor}" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{StaticResource MouseOverBackground}" />
                            <Setter Property="Foreground" Value="{StaticResource WhiteColor}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="Content" Property="RenderTransform" >
                                <Setter.Value>
                                    <TranslateTransform X="1.0" Y="1.0" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <DataTrigger Binding="{Binding ApplicationStatus}" Value="{x:Static Enum:ApplicationStatus.NotRespondig}">
                            <Setter Property="Background" Value="{StaticResource NotRespondingBackground}" />
                            <Setter Property="Foreground" Value="{StaticResource WhiteColor}" />
                        </DataTrigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="#FF888888" />
                            <Setter TargetName="Border" Property="Opacity" Value="0.7" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="ToolbarPanelTemplate">
        <Grid>
            <ListBox Style="{StaticResource ToolbarPanelListBox}" ItemsSource="{Binding Applications}">
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <VirtualizingStackPanel Orientation="Horizontal" />
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Button Style="{StaticResource MenuItemButton}" />
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
    </ControlTemplate>

    <ControlTemplate x:Key="NotificationArea">
        <Border Background="#3FFFFFFF" BorderBrush="#3FBBBBBB" BorderThickness="1" CornerRadius="10" Padding="0">
            <DockPanel>
                <Label VerticalContentAlignment="Center">
                    <Label.Content>
                        <TextBlock Text="{Binding CurrentTime}" ToolTip="{Binding CurrentTime}"
                                   TextAlignment="Center" TextWrapping="Wrap" MaxWidth="80" FontSize="10" FontWeight="Bold" Foreground="{StaticResource WhiteColor}" />
                    </Label.Content>
                </Label>
            </DockPanel>
        </Border>
    </ControlTemplate>

    <Style x:Key="GridListBoxItem" TargetType="ListBoxItem" BasedOn="{StaticResource DefaultListBoxItem}">
        <Setter Property="Margin" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border Name="Border" Padding="2" SnapsToDevicePixels="true">
                        <ContentPresenter />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource AlternationColor}" />
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource SelectedColor}" />
                            <Setter Property="Foreground" Value="{StaticResource WhiteColor}" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource MouseOverColor}" />
                            <Setter Property="Foreground" Value="{StaticResource WhiteColor}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ListBoxGrid" TargetType="ListBox">
        <Setter Property="Width" Value="590" />
        <Setter Property="Height" Value="350" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="AlternationCount" Value="2" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource GridListBoxItem}" />
    </Style>

    <Style x:Key="ToolButton" TargetType="Button" BasedOn="{StaticResource DefaultButton}">
        <Setter Property="Width" Value="32" />
        <Setter Property="Height" Value="32" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="FontStyle" Value="Normal" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border Name="Border" Background="{TemplateBinding Background}">
                        <DockPanel Name="Content">
                            <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" />
                        </DockPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter Property="Background" Value="{StaticResource SelectedBackground}" />
                            <Setter Property="Foreground" Value="{StaticResource WhiteColor}" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{StaticResource MouseOverBackground}" />
                            <Setter Property="Foreground" Value="{StaticResource WhiteColor}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="Content" Property="RenderTransform" >
                                <Setter.Value>
                                    <TranslateTransform X="1.0" Y="1.0" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="TaskManagerApplicationText" TargetType="TextBlock">
        <Setter Property="FontFamily" Value="Verdana" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="TextAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Width" Value="500" />
        <Setter Property="TextWrapping" Value="Wrap" />
    </Style>

    <ControlTemplate x:Key="TaskManagerViewTemplate" TargetType="Window">
        <Border SnapsToDevicePixels="True" Background="{StaticResource WindowColor}" CornerRadius="10" BorderThickness="1" BorderBrush="#FF828790">
            <DockPanel>
                <DockPanel DockPanel.Dock="Top" Cursor="Hand">
                    <Button DockPanel.Dock="Right" IsCancel="True" Style="{StaticResource ToolButton}" HorizontalAlignment="Right" Command="{Binding CloseTaskManagerCommand}">
                        <Image Width="22" Height="22" Source="{StaticResource CloseImage}" />
                    </Button>
                    <Label Content="TaskManager" Foreground="{StaticResource WhiteColor}" VerticalContentAlignment="Center">
                        <Label.InputBindings>
                            <MouseBinding Command="{Binding OpenWindowsTaskManagerCommand}" CommandParameter="taskmgr.exe" Gesture="LeftDoubleClick" />
                        </Label.InputBindings>
                    </Label>
                </DockPanel>
                <Border SnapsToDevicePixels="True" Background="#7FFFFFFF" CornerRadius="10" Padding="5" Margin="2">
                    <DockPanel>
                        <ListBox Style="{StaticResource ListBoxGrid}" ItemsSource="{Binding ActiveApplications}">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <DockPanel ToolTip="{Binding Description}">
                                        <DockPanel.InputBindings>
                                            <MouseBinding Command="{Binding ClickCommand}" Gesture="LeftDoubleClick" />
                                        </DockPanel.InputBindings>
                                        <DockPanel Width="36">
                                            <Image Style="{StaticResource AplicationImage}" />
                                        </DockPanel>
                                        <TextBlock Name="Text" Style="{StaticResource TaskManagerApplicationText}" Text="{Binding Name}" />
                                        <Button DockPanel.Dock="Right" Command="{Binding CloseCommand}" Style="{StaticResource ToolButton}">
                                            <Image Width="22" Height="22" Source="{StaticResource CloseImage}" />
                                        </Button>
                                    </DockPanel>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                    </DockPanel>
                </Border>
            </DockPanel>
        </Border>
    </ControlTemplate>

    <Style TargetType="{x:Type Window}">
        <Setter Property="FontFamily" Value="Segoe UI" />
    </Style>
    
</ResourceDictionary>